package cate.common.table.activity.brightmythequipment.row;

import cate.common.table.ERow;
import cate.common.table.XSSFRowWrap;
import cp.solution.util.str.Str;
import easy.java.dev.note.NoteField;

import java.util.List;

/**
 * @author liuyunke
 * @program: cate-game
 * @create
 * @description:
 */

public class EternalComposeRow extends ERow {
    @NoteField("合成需要物品范围")
    public String material;
    @NoteField("可合成物品范围")
    public String target;
    @NoteField("消耗材料")
    public String cost;
    @NoteField("功能ID")
    public int funcId;

    @Override
    public void parse(XSSFRowWrap xrw) {
        this.id = xrw.getInteger("序号");
        this.material = xrw.getString("合成需要物品范围");
        this.target = xrw.getString("可合成物品范围");
        this.cost = xrw.getString("消耗材料");
        this.funcId = xrw.getInteger("功能ID");
    }

    public List<Integer> equipIds;
    public List<Integer> targetIds;

    @Override
    public void decode() {
        equipIds = Str.strArr2intList(material.split("#"));
        targetIds = Str.strArr2intList(target.split("#"));
    }
}
